package com.neusoft.elmboot.controller;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.elmboot.po.Business;
import com.neusoft.elmboot.po.Comment;
import com.neusoft.elmboot.po.Orders;
import com.neusoft.elmboot.service.BusinessService;
import com.neusoft.elmboot.service.CartService;
import com.neusoft.elmboot.service.CommentService;

@RestController
@RequestMapping("/comment")
public class CommentController {
	
	@Autowired
	private CommentService commentService;
	
	@GetMapping("/{businessId}")
	public List<Comment> listComment(Business business) throws Exception{
		return commentService.listComment(business.getBusinessId());
	}
}
